import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2024-10-14
 * Time:23:06
 */
public class Test {
    public static int sum(int a,int b) {
        return a+b;
    }

    public static double sum(double a,double b,double c) {
        return a+b+c;
    }
    public static void main(String[] args) {
        System.out.println(sum(1,4));
        System.out.println(sum(1.3,5.7,6.5));
    }
    public static int fib(int n) {
        if(n==1){
            return 0;
        }
        if(n==2){
            return 1;
        }
        int f1=0;
        int f2=1;
        int f3=1;
        for(int i=3;i<=n;i++){
            f3=f1+f2;
            f1=f2;
            f2=f3;
        }
        return f3;
    }
    public static void main4(String[] args) {
        System.out.println(fib(7));
    }
    public static int facSum(int m) {
    int sum=0;
    for(int j=1;j<=m;j++){
        sum+=fac(j);
    }
    return sum;
    }
    public static int fac(int n) {
        int ret=1;
        int i=1;
        for(i=1;i<=n;i++){
            ret*=i;
        }
        return ret;
    }
    public static void main2(String[] args) {
        System.out.println(facSum(5));
    }
    public static int max2(int a,int b) {
        return a>b?a:b;
    }

    public static int max3(int a,int b,int c) {
        int max=max2(a,b);
        return max>c?max:c;
    }
    public static void main1(String[] args) {
        System.out.println(max3(3,7,6));
    }
}
